import request from '@/utils/request';

/**
 * 今日数据
 */
export async function amountTotal(data) {
  const res = await request.post('/home/amountTotal', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
// 订单统计
export async function packageStatistics(data) {
  const res = await request.post('/home/packageStatistics', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
// 支付统计
export async function payWayStatistics(data) {
  const res = await request.post('/home/payWayStatistics', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
